<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #con {
            background-color: aqua;

        }

        #con::after {
            content: '';
            display: block;
            clear: both;
        }

        #con div {

            border: 1px solid black;
        }

        #d1 {
            width: 300px;
            height: 150px;
            background-color: red;
            float: left;
            margin-left: 30px;
        }

        #d2 {
            width: 300px;
            height: 150px;
            background-color: blue;
            float: left;
        }

        #d3 {
            width: 300px;
            height: 150px;
            background-color: yellow;
            float: left;
        }
    </style>
</head>

<body>
    <div id="con">
        <div id="d1">d1</div>
        <div id="d2">d2</div>
        <div id="d3">d3</div>
    </div>


</body>

</html>